package edu.rit.cs.ws;


public class MarketServiceProxy implements edu.rit.cs.ws.MarketService {
  private static final long serialVersionUID = 1L;
  private String _endpoint = null;
  private edu.rit.cs.ws.MarketService marketService = null;
  
  public MarketServiceProxy() {
    _initMarketServiceProxy();
  }
  
  public MarketServiceProxy(String endpoint) {
    _endpoint = endpoint;
    _initMarketServiceProxy();
  }
  
  private void _initMarketServiceProxy() {
    try {
      marketService = (new edu.rit.cs.ws.MarketServiceImplServiceLocator()).getMarketServiceImplPort();
      if (marketService != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)marketService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)marketService)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (marketService != null)
      ((javax.xml.rpc.Stub)marketService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public edu.rit.cs.ws.MarketService getMarketService() {
    if (marketService == null)
      _initMarketServiceProxy();
    return marketService;
  }
  
  public java.lang.String sayHi(java.lang.String arg0) throws java.rmi.RemoteException{
    if (marketService == null)
      _initMarketServiceProxy();
    return marketService.sayHi(arg0);
  }
  
  public edu.rit.cs.ws.SymbolInfo[] getSymbols() throws java.rmi.RemoteException{
    if (marketService == null)
      _initMarketServiceProxy();
    return marketService.getSymbols();
  }
  
  public double getQuote(java.lang.String arg0) throws java.rmi.RemoteException{
    if (marketService == null)
      _initMarketServiceProxy();
    return marketService.getQuote(arg0);
  }
  
  
}